<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>

	<div id="header">
		<div class="topnav">
			<div class="w1200 clearfix" id="startlogin">
				<span class="fleft"> <input type="text" class="searchbox"
					id="msg_j" pacleholder="输入景点吧……" /> <i class="iconfont">&#xF010;</i><span
					id="searchit">搜索景点</span>
				</span>
				<!-- <span
					class="fright login"><a href="#" id="Regist_start_">注册</a></span> -->
				<span class="fright login"><a
					href="${pageContext.request.contextPath}/userapi/tofrontlogin"
					id="Login_start">登录/注册</a></span>
			</div>
			<div class="w1200 clearfix" id="hadlogin">
				<span class="fleft"> <input type="text" class="searchbox"
					id="msg_j" pacleholder="输入景点吧……" /> <i class="iconfont">&#xF010;</i><span
					id="searchit">搜索景点</span>
				</span> <span class="fright login"><a
					href="${pageContext.request.contextPath}/outapi/frontloginout">退出</a></span><span
					class="fright login"><a
					href="${pageContext.request.contextPath}/admin/views/information.jsp"
					id="loginout">欢迎回来，${username}！</a></span>
			</div>
		</div>
		<div class="w1200">
			<div class="snav">
				<div class="w1200">
					<a class="logobox" href="#" title="舒客Seeker--旅行，旅居，旅友"> <strong>舒客<span>Seeker<i>&reg;</i></span></strong><span>旅行&nbsp;&sdot;&nbsp;旅居&nbsp;&sdot;&nbsp;旅友</span>
					</a>
				</div>
			</div>
			<div class="navtab">
				<a class="" href="${pageContext.request.contextPath}/home"><i
					class="iconfont">&#xF000;</i>首页</a> <a
					href="${pageContext.request.contextPath}/area"> <!-- 					<i class="iconfont">&#xF002;</i>LeisureSeeker</a> -->
					<a href="${pageContext.request.contextPath}/routeapi/routeplan"><i
						class="iconfont">&#xF002;</i>路线规划</a> <%-- 						<a href="${pageContext.request.contextPath}/route"> --%>
					<!-- 						<i class="iconfont">&#xF011;</i><span>旅居</span>线路</a> -->
					<a href="${pageContext.request.contextPath}/sharing"><i
						class="iconfont">&#xF001;</i><span>旅友</span>分享</a>
			</div>
			<!-- 上面有写绝对路径的先不要改，做测试用 -->
		</div>
	</div>
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script type="text/javascript">
		$('#searchit').click(function() {
			var scenic = $('#msg_j').val();
			if(scenic != "") {
				location.href="${pageContext.request.contextPath}/scenics/" + scenic + "/0";
			}
		});
	</script>
	<script type="text/javascript">
		var flag = "${flag}";
		switch (flag) {
		case 'home':
			$('.navtab a:eq(0)').attr('class','current');
			break;
		case 'area':
			$('.navtab a:eq(1)').attr('class','current');
			break;
		case 'route':
			$('.navtab a:eq(3)').attr('class','current');
			break;
		case 'sharing':
			$('.navtab a:eq(4)').attr('class','current');
			break;
		}
	</script>
	<!-- cyf前端登录后session验证 -->
	<script type="text/javascript">
		//session验证及保存
		$(document).ready(function() {
			if (${sessionScope.username != null}) {
				$("#startlogin").hide();
				//var myname = $("#myname");
				//myname.text("${sessionScope.user.uname}");
				$("#hadlogin").show();
			}
		})
	</script>
	<!-- 前端登录后session验证 -->
</body>
</html>